import { DialogForm } from 'custom/index'
import { addEmailApi } from './api'
import { emailTypeOptions } from './constant'

const bindDialog = new DialogForm('DialogForm')

bindDialog
  .title('绑定邮箱')
  .postApi(addEmailApi)
  .useGroup()
    .useItem('emailUrl').label('邮箱').required().end()
    .useSelect('emailType', emailTypeOptions).label('邮箱类型').required().end()
    .useItem('password').label('密码').setProp('type', 'password').setProp('showPassword', true).setProp('autocomplete', 'new-password').required().end()

export {
  bindDialog
}
